<template>
	<view class="workbench">
		<uni-nav-bar title="工作台" :border="false" :statusBar="true" rightIcon="plusempty"></uni-nav-bar>
		<view class="nav_banner">
			<image src="../../../static/images/workbench_banner.png" class="nav_banner_img"/>
			<view class="nav_banner_content">
				<text>{{hkcUser.userName}}</text>
				<text>您好！ {{showTime()}}</text>
			</view>
		</view>
		<view class="notice_content">
			<text class="notice_name">公告</text>
			<view class="notice_line"></view>
			<text class="notice_desc">将于3月24号进行会议！</text>
		</view>
		<view class="division_view"></view>
		<text class="common_title">我的常用</text>
		<uni-grid :showBorder="false" :column="4" :highlight="false" :style="{marginTop:'60rpx'}">
			<uni-grid-item>
				<view class="work_row_item" @click="toAudit">
					<image src="../../../static/images/common_btn1.png"/>
					<text>审批</text>
				</view>
			</uni-grid-item>
			<uni-grid-item>
				<view class="work_row_item">
					<image src="../../../static/images/common_btn2.png" @click="toBusiness"/>
					<text>业务</text>
				</view>
			</uni-grid-item>
			<uni-grid-item>
				<view class="work_row_item" @click="toSafe">
					<image src="../../../static/images/common_btn3.png"/>
					<text>安全</text>
				</view>
			</uni-grid-item>
			<uni-grid-item>
				<view class="work_row_item" @click="toCost">
					<image src="../../../static/images/common_btn4.png"/>
					<text>费用</text>
				</view>
			</uni-grid-item>
			
			<uni-grid-item>
				<view class="work_row_item" @click="toDaily">
					<image src="../../../static/images/common_btn5.png"/>
					<text>日报</text>
				</view>
			</uni-grid-item>
			<uni-grid-item>
				<view class="work_row_item" @click="toQuality">
					<image src="../../../static/images/common_btn6.png"/>
					<text>质量</text>
				</view>
			</uni-grid-item>
			<uni-grid-item>
				<view class="work_row_item" @click="toBlank">
					<image src="../../../static/images/common_btn7.png"/>
					<text>档案</text>
				</view>
			</uni-grid-item>
			<uni-grid-item>
				<view class="work_row_item">
					<image src="../../../static/images/common_btn8.png"/>
					<text></text>
				</view>
			</uni-grid-item>
		</uni-grid>
	</view>
</template>

<script>
	export default {
		data() {
			return {	
				hkcUser:{
					"result":null,
					"uid":null,
					"ROLE_ID":null}
				}
		},
		methods: {
			showTime(){
				var _this = this;
			  let yy = new Date().getFullYear();
			  let mm = new Date().getMonth()+1;
			  let dd = new Date().getDate();
			  console.log("yy="+yy)
			 return yy+'年'+mm+'月'+dd+'日';
			},
			toCost(){
				this.$utils.navto('../../expenses/expenses')
			},
			toAudit(){
				this.$utils.navto('../../audit/audit')
			},			
			toDaily(){
				this.$utils.navto('../../daily_paper/daily_paper')
			},
			toQuality() {
				this.$utils.navto('../../quality/quality')
			},
			toSafe() {
				this.$utils.navto('../../safe/safe')
			},
			toBlank() {
				console.log("====toBlank===")
				this.$utils.navto('../../blank/blank')
			},
			toBusiness(){
				this.$utils.navto('../../business/business')
			}
		},
		onLoad() {
			let _this = this;
			uni.getStorage({
			    key: 'userInfo',
			    success: function (res) {
			        console.log(res.data);
					_this.hkcUser = res.data;
			    }
			});
		},	

	}
</script>

<style scoped>
.workbench{
	width: 750rpx;
	flex: 1;
	display: flex;
	flex-direction: column;
	/* align-items: center; */
}
.nav_banner{
	width: 750rpx;
	height: 300rpx;
	position: relative;
}
.nav_banner_img{
	width: 750rpx;
	height: 300rpx;
}
.nav_banner_content{
	display: flex;
	flex-direction: column;
	position: absolute;
	top:76rpx;
	left:56rpx;
}
.nav_banner_content text:nth-child(1){
	font-size:36rpx;
	font-weight:bold;
	color:#fff;
}
.nav_banner_content text:nth-child(2){
	margin-top: 20rpx;
	font-size:28rpx;
	font-weight:bold;
	color:#A5C2FD;
}
.notice_content{
	margin-top: 40rpx;
	margin-left: 66rpx;
	display: flex;
	flex-direction: row;
	align-items: center;
}
.notice_name{
	font-size:36rpx;
	font-weight:bold;
	color:#2B69E7;
}
.notice_line{
	width:1px;
	height:32rpx;
	background:#999999;
	margin: 0 28rpx;
}
.notice_desc{
	font-size:28rpx;
	font-weight:500;
	color:#454545;
}
.division_view{
	margin-top: 20rpx;
	width: 750rpx;
	height: 6px;
	background-color: #F9F9F9;
}
.common_title{
	
	margin-top: 40rpx;
	margin-left: 40rpx;
	font-size:36rpx;
	font-weight:bold;
	color:#454545;
}
.work_row{
	margin-top: 60rpx;
}
.work_row_item{
	display: flex;
	flex-direction: column;
	align-items: center;
	
}
.work_row_item image{
	width: 100rpx;
	height: 100rpx;
}
.work_row_item text{
	margin-top: 22rpx;
	font-size:28rpx;
	font-weight:500;
	color:#454545;
}
</style>
